package com.rmy.queue.service.impl;

import java.util.List;

import com.rmy.common.annotation.DataScope;
import com.rmy.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.rmy.queue.mapper.QmsCompConfigMapper;
import com.rmy.queue.domain.QmsCompConfig;
import com.rmy.queue.service.IQmsCompConfigService;

/**
 * 综合屏配置Service业务层处理
 *
 * @author rmy
 * @date 2022-10-03
 */
@Service
public class QmsCompConfigServiceImpl implements IQmsCompConfigService
{
    @Autowired
    private QmsCompConfigMapper qmsCompConfigMapper;

    /**
     * 查询综合屏配置
     *
     * @param id 综合屏配置主键
     * @return 综合屏配置
     */
    @Override
    public QmsCompConfig selectQmsCompConfigById(Long id)
    {
        return qmsCompConfigMapper.selectQmsCompConfigById(id);
    }

    /**
     * 查询综合屏配置列表
     *
     * @param qmsCompConfig 综合屏配置
     * @return 综合屏配置
     */
    @Override
    @DataScope(deptAlias = "d")
    public List<QmsCompConfig> selectQmsCompConfigList(QmsCompConfig qmsCompConfig)
    {
        return qmsCompConfigMapper.selectQmsCompConfigList(qmsCompConfig);
    }

    /**
     * 新增综合屏配置
     *
     * @param qmsCompConfig 综合屏配置
     * @return 结果
     */
    @Override
    public int insertQmsCompConfig(QmsCompConfig qmsCompConfig)
    {
        qmsCompConfig.setCreateTime(DateUtils.getNowDate());
        return qmsCompConfigMapper.insertQmsCompConfig(qmsCompConfig);
    }

    /**
     * 修改综合屏配置
     *
     * @param qmsCompConfig 综合屏配置
     * @return 结果
     */
    @Override
    public int updateQmsCompConfig(QmsCompConfig qmsCompConfig)
    {
        qmsCompConfig.setUpdateTime(DateUtils.getNowDate());
        return qmsCompConfigMapper.updateQmsCompConfig(qmsCompConfig);
    }

    /**
     * 批量删除综合屏配置
     *
     * @param ids 需要删除的综合屏配置主键
     * @return 结果
     */
    @Override
    public int deleteQmsCompConfigByIds(Long[] ids)
    {
        return qmsCompConfigMapper.deleteQmsCompConfigByIds(ids);
    }

    /**
     * 删除综合屏配置信息
     *
     * @param id 综合屏配置主键
     * @return 结果
     */
    @Override
    public int deleteQmsCompConfigById(Long id)
    {
        return qmsCompConfigMapper.deleteQmsCompConfigById(id);
    }
}
